package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import com.itheima.pojo.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName MenuDao
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2020/1/14 10:42
 * @Version V1.0
 * @Since JDK 1.8
 */
public interface MenuDao {
    public Page<Map> findAll(@Param("queryString") String queryString);

    public List<Map> findRoleByMenuId(Integer id);

    //查询是否中间表是否有父级menu
    public Integer findParentMenuByMenuId(Integer menuId);

    public void delMenuRole(Integer menuId);

    public void addMenuRole(Integer menuId,Integer roleId);

    public List<Menu> findMenuByUsername(@Param("username") String username);

    public void delMenuChildren(Integer menuId,@Param("roleId") List<Integer> roleId);
}
